package Arbori;

import Visitor.Visitor;

public class Nod {
	protected Nod fDrept;
	protected Nod fStang;
	protected double x;

        public void acceptVisitor(Visitor v){
			v.visit(this);
		}
	public Nod getFDrept() {
		return fDrept;
	}
	public Nod getFStang() {
	return fStang;
}
	public double getX() {
		return x;
	}
	public void setFDrept(Nod drept) {
		fDrept = drept;
	}
	public void setFStang(Nod stang) {
		fStang = stang;
	}
	
	public void setX(double x) {
		this.x = x;
		if(this.getFDrept()!=null)
			this.fDrept.setX(x);
		if(this.getFStang()!=null)
		this.fStang.setX(x);
	}

}
